home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gcc / gcc258s.zoo / gcc.info-22 < prev    next >
Encoding:
GNU Info File  |  1993-11-30  |  22.3 KB  |  525 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  2. file gcc.texi.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Published by the Free Software Foundation 675 Massachusetts Avenue
  7. Cambridge, MA 02139 USA
  8.  
  9.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  10.  
  11.    Permission is granted to make and distribute verbatim copies of this
  12. manual provided the copyright notice and this permission notice are
  13. preserved on all copies.
  14.  
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided also
  17. that the sections entitled "GNU General Public License" and "Protect
  18. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  19. original, and provided that the entire resulting derived work is
  20. distributed under the terms of a permission notice identical to this
  21. one.
  22.  
  23.    Permission is granted to copy and distribute translations of this
  24. manual into another language, under the above conditions for modified
  25. versions, except that the sections entitled "GNU General Public
  26. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  27. permission notice, may be included in translations approved by the Free
  28. Software Foundation instead of in the original English.
  29.  
  30. File: gcc.info,  Node: Misc,  Prev: Cross-compilation,  Up: Target Macros
  31.  
  32. Miscellaneous Parameters
  33. ========================
  34.  
  35. `PREDICATE_CODES'
  36.      Define this if you have defined special-purpose predicates in the
  37.      file `MACHINE.c'.  This macro is called within an initializer of an
  38.      array of structures.  The first field in the structure is the name
  39.      of a predicate and the second field is an array of rtl codes.  For
  40.      each predicate, list all rtl codes that can be in expressions
  41.      matched by the predicate.  The list should have a trailing comma.
  42.      Here is an example of two entries in the list for a typical RISC
  43.      machine:
  44.  
  45.           #define PREDICATE_CODES \
  46.             {"gen_reg_rtx_operand", {SUBREG, REG}},  \
  47.             {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}},
  48.  
  49.      Defining this macro does not affect the generated code (however,
  50.      incorrect definitions that omit an rtl code that may be matched by
  51.      the predicate can cause the compiler to malfunction).  Instead, it
  52.      allows the table built by `genrecog' to be more compact and
  53.      efficient, thus speeding up the compiler.  The most important
  54.      predicates to include in the list specified by this macro are
  55.      thoses used in the most insn patterns.
  56.  
  57. `CASE_VECTOR_MODE'
  58.      An alias for a machine mode name.  This is the machine mode that
  59.      elements of a jump-table should have.
  60.  
  61. `CASE_VECTOR_PC_RELATIVE'
  62.      Define this macro if jump-tables should contain relative addresses.
  63.  
  64. `CASE_DROPS_THROUGH'
  65.      Define this if control falls through a `case' insn when the index
  66.      value is out of range.  This means the specified default-label is
  67.      actually ignored by the `case' insn proper.
  68.  
  69. `CASE_VALUES_THRESHOLD'
  70.      Define this to be the smallest number of different values for
  71.      which it is best to use a jump-table instead of a tree of
  72.      conditional branches.  The default is four for machines with a
  73.      `casesi' instruction and five otherwise.  This is best for most
  74.      machines.
  75.  
  76. `WORD_REGISTER_OPERATIONS'
  77.      Define this macro if operations between registers with integral
  78.      mode smaller than a word are always performed on the entire
  79.      register.  Most RISC machines have this property and most CISC
  80.      machines do not.
  81.  
  82. `LOAD_EXTEND_OP (MODE)'
  83.      Define this macro to be a C expression indicating when insns that
  84.      read memory in MODE, an integral mode narrower than a word, set the
  85.      bits outside of MODE to be either the sign-extension or the
  86.      zero-extension of the data read.  Return `SIGN_EXTEND' for values
  87.      of MODE for which the insn sign-extends, `ZERO_EXTEND' for which
  88.      it zero-extends, and `NIL' for other modes.
  89.  
  90.      This macro is not called with MODE non-integral or with a width
  91.      greater than or equal to `BITS_PER_WORD', so you may return any
  92.      value in this case.  Do not define this macro if it would always
  93.      return `NIL'.  On machines where this macro is defined, you will
  94.      normally define it as the constant `SIGN_EXTEND' or `ZERO_EXTEND'.
  95.  
  96. `IMPLICIT_FIX_EXPR'
  97.      An alias for a tree code that should be used by default for
  98.      conversion of floating point values to fixed point.  Normally,
  99.      `FIX_ROUND_EXPR' is used.
  100.  
  101. `FIXUNS_TRUNC_LIKE_FIX_TRUNC'
  102.      Define this macro if the same instructions that convert a floating
  103.      point number to a signed fixed point number also convert validly
  104.      to an unsigned one.
  105.  
  106. `EASY_DIV_EXPR'
  107.      An alias for a tree code that is the easiest kind of division to
  108.      compile code for in the general case.  It may be `TRUNC_DIV_EXPR',
  109.      `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'.  These four
  110.      division operators differ in how they round the result to an
  111.      integer.  `EASY_DIV_EXPR' is used when it is permissible to use
  112.      any of those kinds of division and the choice should be made on
  113.      the basis of efficiency.
  114.  
  115. `MOVE_MAX'
  116.      The maximum number of bytes that a single instruction can move
  117.      quickly from memory to memory.
  118.  
  119. `MAX_MOVE_MAX'
  120.      The maximum number of bytes that a single instruction can move
  121.      quickly from memory to memory.  If this is undefined, the default
  122.      is `MOVE_MAX'.  Otherwise, it is the constant value that is the
  123.      largest value that `MOVE_MAX' can have at run-time.
  124.  
  125. `SHIFT_COUNT_TRUNCATED'
  126.      A C expression that is nonzero if on this machine the number of
  127.      bits actually used for the count of a shift operation is equal to
  128.      the number of bits needed to represent the size of the object
  129.      being shifted.  When this macro is non-zero, the compiler will
  130.      assume that it is safe to omit a sign-extend, zero-extend, and
  131.      certain bitwise `and' instructions that truncates the count of a
  132.      shift operation.  On machines that have instructions that act on
  133.      bitfields at variable positions, which may include `bit test'
  134.      instructions, a nonzero `SHIFT_COUNT_TRUNCATED' also enables
  135.      deletion of truncations of the values that serve as arguments to
  136.      bitfield instructions.
  137.  
  138.      If both types of instructions truncate the count (for shifts) and
  139.      position (for bitfield operations), or if no variable-position
  140.      bitfield instructions exist, you should define this macro.
  141.  
  142.      However, on some machines, such as the 80386 and the 680x0,
  143.      truncation only applies to shift operations and not the (real or
  144.      pretended) bitfield operations.  Define `SHIFT_COUNT_TRUNCATED' to
  145.      be zero on such machines.  Instead, add patterns to the `md' file
  146.      that include the implied truncation of the shift instructions.
  147.  
  148.      You need not define this macro if it would always have the value
  149.      of zero.
  150.  
  151. `TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)'
  152.      A C expression which is nonzero if on this machine it is safe to
  153.      "convert" an integer of INPREC bits to one of OUTPREC bits (where
  154.      OUTPREC is smaller than INPREC) by merely operating on it as if it
  155.      had only OUTPREC bits.
  156.  
  157.      On many machines, this expression can be 1.
  158.  
  159.      When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for
  160.      modes for which `MODES_TIEABLE_P' is 0, suboptimal code can result.
  161.      If this is the case, making `TRULY_NOOP_TRUNCATION' return 0 in
  162.      such cases may improve things.
  163.  
  164. `STORE_FLAG_VALUE'
  165.      A C expression describing the value returned by a comparison
  166.      operator with an integral mode and stored by a store-flag
  167.      instruction (`sCOND') when the condition is true.  This
  168.      description must apply to *all* the `sCOND' patterns and all the
  169.      comparison operators whose results have a `MODE_INT' mode.
  170.  
  171.      A value of 1 or -1 means that the instruction implementing the
  172.      comparison operator returns exactly 1 or -1 when the comparison is
  173.      true and 0 when the comparison is false.  Otherwise, the value
  174.      indicates which bits of the result are guaranteed to be 1 when the
  175.      comparison is true.  This value is interpreted in the mode of the
  176.      comparison operation, which is given by the mode of the first
  177.      operand in the `sCOND' pattern.  Either the low bit or the sign
  178.      bit of `STORE_FLAG_VALUE' be on.  Presently, only those bits are
  179.      used by the compiler.
  180.  
  181.      If `STORE_FLAG_VALUE' is neither 1 or -1, the compiler will
  182.      generate code that depends only on the specified bits.  It can also
  183.      replace comparison operators with equivalent operations if they
  184.      cause the required bits to be set, even if the remaining bits are
  185.      undefined.  For example, on a machine whose comparison operators
  186.      return an `SImode' value and where `STORE_FLAG_VALUE' is defined as
  187.      `0x80000000', saying that just the sign bit is relevant, the
  188.      expression
  189.  
  190.           (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0))
  191.  
  192.      can be converted to
  193.  
  194.           (ashift:SI X (const_int N))
  195.  
  196.      where N is the appropriate shift count to move the bit being
  197.      tested into the sign bit.
  198.  
  199.      There is no way to describe a machine that always sets the
  200.      low-order bit for a true value, but does not guarantee the value
  201.      of any other bits, but we do not know of any machine that has such
  202.      an instruction.  If you are trying to port GNU CC to such a
  203.      machine, include an instruction to perform a logical-and of the
  204.      result with 1 in the pattern for the comparison operators and let
  205.      us know (*note How to Report Bugs: Bug Reporting.).
  206.  
  207.      Often, a machine will have multiple instructions that obtain a
  208.      value from a comparison (or the condition codes).  Here are rules
  209.      to guide the choice of value for `STORE_FLAG_VALUE', and hence the
  210.      instructions to be used:
  211.  
  212.         * Use the shortest sequence that yields a valid definition for
  213.           `STORE_FLAG_VALUE'.  It is more efficient for the compiler to
  214.           "normalize" the value (convert it to, e.g., 1 or 0) than for
  215.           the comparison operators to do so because there may be
  216.           opportunities to combine the normalization with other
  217.           operations.
  218.  
  219.         * For equal-length sequences, use a value of 1 or -1, with -1
  220.           being slightly preferred on machines with expensive jumps and
  221.           1 preferred on other machines.
  222.  
  223.         * As a second choice, choose a value of `0x80000001' if
  224.           instructions exist that set both the sign and low-order bits
  225.           but do not define the others.
  226.  
  227.         * Otherwise, use a value of `0x80000000'.
  228.  
  229.      Many machines can produce both the value chosen for
  230.      `STORE_FLAG_VALUE' and its negation in the same number of
  231.      instructions.  On those machines, you should also define a pattern
  232.      for those cases, e.g., one matching
  233.  
  234.           (set A (neg:M (ne:M B C)))
  235.  
  236.      Some machines can also perform `and' or `plus' operations on
  237.      condition code values with less instructions than the corresponding
  238.      `sCOND' insn followed by `and' or `plus'.  On those machines,
  239.      define the appropriate patterns.  Use the names `incscc' and
  240.      `decscc', respectively, for the the patterns which perform `plus'
  241.      or `minus' operations on condition code values.  See `rs6000.md'
  242.      for some examples.  The GNU Superoptizer can be used to find such
  243.      instruction sequences on other machines.
  244.  
  245.      You need not define `STORE_FLAG_VALUE' if the machine has no
  246.      store-flag instructions.
  247.  
  248. `FLOAT_STORE_FLAG_VALUE'
  249.      A C expression that gives a non-zero floating point value that is
  250.      returned when comparison operators with floating-point results are
  251.      true.  Define this macro on machine that have comparison
  252.      operations that return floating-point values.  If there are no
  253.      such operations, do not define this macro.
  254.  
  255. `Pmode'
  256.      An alias for the machine mode for pointers.  Normally the
  257.      definition can be
  258.  
  259.           #define Pmode SImode
  260.  
  261. `FUNCTION_MODE'
  262.      An alias for the machine mode used for memory references to
  263.      functions being called, in `call' RTL expressions.  On most
  264.      machines this should be `QImode'.
  265.  
  266. `INTEGRATE_THRESHOLD (DECL)'
  267.      A C expression for the maximum number of instructions above which
  268.      the function DECL should not be inlined.  DECL is a
  269.      `FUNCTION_DECL' node.
  270.  
  271.      The default definition of this macro is 64 plus 8 times the number
  272.      of arguments that the function accepts.  Some people think a larger
  273.      threshold should be used on RISC machines.
  274.  
  275. `SCCS_DIRECTIVE'
  276.      Define this if the preprocessor should ignore `#sccs' directives
  277.      and print no error message.
  278.  
  279. `NO_IMPLICIT_EXTERN_C'
  280.      Define this macro if the system header files support C++ as well
  281.      as C.  This macro inhibits the usual method of using system header
  282.      files in C++, which is to pretend that the file's contents are
  283.      enclosed in `extern "C" {...}'.
  284.  
  285. `HANDLE_PRAGMA (STREAM)'
  286.      Define this macro if you want to implement any pragmas.  If
  287.      defined, it should be a C statement to be executed when `#pragma'
  288.      is seen.  The argument STREAM is the stdio input stream from which
  289.      the source text can be read.
  290.  
  291.      It is generally a bad idea to implement new uses of `#pragma'.  The
  292.      only reason to define this macro is for compatibility with other
  293.      compilers that do support `#pragma' for the sake of any user
  294.      programs which already use it.
  295.  
  296. `DOLLARS_IN_IDENTIFIERS'
  297.      Define this macro to control use of the character `$' in identifier
  298.      names.  The value should be 0, 1, or 2.  0 means `$' is not allowed
  299.      by default; 1 means it is allowed by default if `-traditional' is
  300.      used; 2 means it is allowed by default provided `-ansi' is not
  301.      used.  1 is the default; there is no need to define this macro in
  302.      that case.
  303.  
  304. `NO_DOLLAR_IN_LABEL'
  305.      Define this macro if the assembler does not accept the character
  306.      `$' in label names.  By default constructors and destructors in
  307.      G++ have `$' in the identifiers.  If this macro is defined, `.' is
  308.      used instead.
  309.  
  310. `NO_DOT_IN_LABEL'
  311.      Define this macro if the assembler does not accept the character
  312.      `.' in label names.  By default constructors and destructors in G++
  313.      have names that use `.'.  If this macro is defined, these names
  314.      are rewritten to avoid `.'.
  315.  
  316. `DEFAULT_MAIN_RETURN'
  317.      Define this macro if the target system expects every program's
  318.      `main' function to return a standard "success" value by default
  319.      (if no other value is explicitly returned).
  320.  
  321.      The definition should be a C statement (sans semicolon) to
  322.      generate the appropriate rtl instructions.  It is used only when
  323.      compiling the end of `main'.
  324.  
  325. `HAVE_ATEXIT'
  326.      Define this if the target system supports the function `atexit'
  327.      from the ANSI C standard.  If this is not defined, and
  328.      `INIT_SECTION_ASM_OP' is not defined, a default `exit' function
  329.      will be provided to support C++.
  330.  
  331. `EXIT_BODY'
  332.      Define this if your `exit' function needs to do something besides
  333.      calling an external function `_cleanup' before terminating with
  334.      `_exit'.  The `EXIT_BODY' macro is only needed if netiher
  335.      `HAVE_ATEXIT' nor `INIT_SECTION_ASM_OP' are defined.
  336.  
  337. `INSN_SETS_ARE_DELAYED (INSN)'
  338.      Define this macro as a C expression that is nonzero if it is safe
  339.      for the delay slot scheduler to place instructions in the delay
  340.      slot of INSN, even if they appear to use a resource set or
  341.      clobbered in INSN.  INSN is always a `jump_insn' or an `insn'; GNU
  342.      CC knows that every `call_insn' has this behavior.  On machines
  343.      where some `insn' or `jump_insn' is really a function call and
  344.      hence has this behavior, you should define this macro.
  345.  
  346.      You need not define this macro if it would always return zero.
  347.  
  348. `INSN_REFERENCES_ARE_DELAYED (INSN)'
  349.      Define this macro as a C expression that is nonzero if it is safe
  350.      for the delay slot scheduler to place instructions in the delay
  351.      slot of INSN, even if they appear to set or clobber a resource
  352.      referenced in INSN.  INSN is always a `jump_insn' or an `insn'.
  353.      On machines where some `insn' or `jump_insn' is really a function
  354.      call and its operands are registers whose use is actually in the
  355.      subroutine it calls, you should define this macro.  Doing so
  356.      allows the delay slot scheduler to move instructions which copy
  357.      arguments into the argument registers into the delay slot of INSN.
  358.  
  359.      You need not define this macro if it would always return zero.
  360.  
  361. File: gcc.info,  Node: Config,  Next: Index,  Prev: Target Macros,  Up: Top
  362.  
  363. The Configuration File
  364. **********************
  365.  
  366.    The configuration file `xm-MACHINE.h' contains macro definitions
  367. that describe the machine and system on which the compiler is running,
  368. unlike the definitions in `MACHINE.h', which describe the machine for
  369. which the compiler is producing output.  Most of the values in
  370. `xm-MACHINE.h' are actually the same on all machines that GNU CC runs
  371. on, so large parts of all configuration files are identical.  But there
  372. are some macros that vary:
  373.  
  374. `USG'
  375.      Define this macro if the host system is System V.
  376.  
  377. `VMS'
  378.      Define this macro if the host system is VMS.
  379.  
  380. `FAILURE_EXIT_CODE'
  381.      A C expression for the status code to be returned when the compiler
  382.      exits after serious errors.
  383.  
  384. `SUCCESS_EXIT_CODE'
  385.      A C expression for the status code to be returned when the compiler
  386.      exits without serious errors.
  387.  
  388. `HOST_WORDS_BIG_ENDIAN'
  389.      Defined if the host machine stores words of multi-word values in
  390.      big-endian order.  (GNU CC does not depend on the host byte
  391.      ordering within a word.)
  392.  
  393. `HOST_FLOAT_WORDS_BIG_ENDIAN'
  394.      Define this macro to be 1 if the host machine stores `DFmode',
  395.      `XFmode' or `TFmode' floating point numbers in memory with the
  396.      word containing the sign bit at the lowest address; otherwise,
  397.      define it to be zero.
  398.  
  399.      This macro need not be defined if the ordering is the same as for
  400.      multi-word integers.
  401.  
  402. `HOST_FLOAT_FORMAT'
  403.      A numeric code distinguishing the floating point format for the
  404.      host machine.  See `TARGET_FLOAT_FORMAT' in *Note Storage Layout::
  405.      for the alternatives and default.
  406.  
  407. `HOST_BITS_PER_CHAR'
  408.      A C expression for the number of bits in `char' on the host
  409.      machine.
  410.  
  411. `HOST_BITS_PER_SHORT'
  412.      A C expression for the number of bits in `short' on the host
  413.      machine.
  414.  
  415. `HOST_BITS_PER_INT'
  416.      A C expression for the number of bits in `int' on the host machine.
  417.  
  418. `HOST_BITS_PER_LONG'
  419.      A C expression for the number of bits in `long' on the host
  420.      machine.
  421.  
  422. `ONLY_INT_FIELDS'
  423.      Define this macro to indicate that the host compiler only supports
  424.      `int' bit fields, rather than other integral types, including
  425.      `enum', as do most C compilers.
  426.  
  427. `EXECUTABLE_SUFFIX'
  428.      Define this macro if the host system uses a naming convention for
  429.      executable files that involves a common suffix (such as, in some
  430.      systems, `.exe') that must be mentioned explicitly when you run
  431.      the program.
  432.  
  433. `OBSTACK_CHUNK_SIZE'
  434.      A C expression for the size of ordinary obstack chunks.  If you
  435.      don't define this, a usually-reasonable default is used.
  436.  
  437. `OBSTACK_CHUNK_ALLOC'
  438.      The function used to allocate obstack chunks.  If you don't define
  439.      this, `xmalloc' is used.
  440.  
  441. `OBSTACK_CHUNK_FREE'
  442.      The function used to free obstack chunks.  If you don't define
  443.      this, `free' is used.
  444.  
  445. `USE_C_ALLOCA'
  446.      Define this macro to indicate that the compiler is running with the
  447.      `alloca' implemented in C.  This version of `alloca' can be found
  448.      in the file `alloca.c'; to use it, you must also alter the
  449.      `Makefile' variable `ALLOCA'.  (This is done automatically for the
  450.      systems on which we know it is needed.)
  451.  
  452.      If you do define this macro, you should probably do it as follows:
  453.  
  454.           #ifndef __GNUC__
  455.           #define USE_C_ALLOCA
  456.           #else
  457.           #define alloca __builtin_alloca
  458.           #endif
  459.  
  460.      so that when the compiler is compiled with GNU CC it uses the more
  461.      efficient built-in `alloca' function.
  462.  
  463. `FUNCTION_CONVERSION_BUG'
  464.      Define this macro to indicate that the host compiler does not
  465.      properly handle converting a function value to a
  466.      pointer-to-function when it is used in an expression.
  467.  
  468. `HAVE_VPRINTF'
  469.      Define this if the library function `vprintf' is available on your
  470.      system.
  471.  
  472. `MULTIBYTE_CHARS'
  473.      Define this macro to enable support for multibyte characters in the
  474.      input to GNU CC.  This requires that the host system support the
  475.      ANSI C library functions for converting multibyte characters to
  476.      wide characters.
  477.  
  478. `HAVE_PUTENV'
  479.      Define this if the library function `putenv' is available on your
  480.      system.
  481.  
  482. `NO_SYS_SIGLIST'
  483.      Define this if your system *does not* provide the variable
  484.      `sys_siglist'.
  485.  
  486. `USE_PROTOTYPES'
  487.      Define this to be 1 if you know that the host compiler supports
  488.      prototypes, even if it doesn't define __STDC__, or define it to be
  489.      0 if you do not want any prototypes used in compiling GNU CC.  If
  490.      `USE_PROTOTYPES' is not defined, it will be determined
  491.      automatically whether your compiler supports prototypes by
  492.      checking if `__STDC__' is defined.
  493.  
  494. `NO_MD_PROTOTYPES'
  495.      Define this if you wish suppression of prototypes generated from
  496.      the machine description file, but to use other prototypes within
  497.      GNU CC.  If `USE_PROTOTYPES' is defined to be 0, or the host
  498.      compiler does not support prototypes, this macro has no effect.
  499.  
  500. `MD_CALL_PROTOTYPES'
  501.      Define this if you wish to generate prototypes for the `gen_call'
  502.      or `gen_call_value' functions generated from the machine
  503.      description file.  If `USE_PROTOTYPES' is defined to be 0, or the
  504.      host compiler does not support prototypes, or `NO_MD_PROTOTYPES'
  505.      is defined, this macro has no effect.  As soon as all of the
  506.      machine descriptions are modified to have the appropriate number
  507.      of arguments, this macro will be removed.
  508.  
  509.      Some systems do provide this variable, but with a different name
  510.      such as `_sys_siglist'.  On these systems, you can define
  511.      `sys_siglist' as a macro which expands into the name actually
  512.      provided.
  513.  
  514. `NO_STAB_H'
  515.      Define this if your system does not have the include file
  516.      `stab.h'.  If `USG' is defined, `NO_STAB_H' is assumed.
  517.  
  518.    In addition, configuration files for system V define `bcopy',
  519. `bzero' and `bcmp' as aliases.  Some files define `alloca' as a macro
  520. when compiled with GNU CC, in order to take advantage of the benefit of
  521. GNU CC's built-in `alloca'.
  522.  
  523.